﻿using DAQ.Common;

namespace DAQ.PROTOCOL
{
    public class CONFIGURATION_SET
    {
        public static byte[] GetSendBytes(byte Addr, byte[] data)
        {
            byte[] bytes = new byte[data.Length + 2];
            data[0] = Addr;
            data[1] = 0x36;
            data.CopyTo(bytes, 2);
            return BasicUtil.AppendChecksum(data);
        }
        public static int GetResult(byte ret)
        {
            if (ret == 0xFB)// communication OK
            {
                return 0;
            }
            else if (ret == 0xFA)//communication FAIL
            {
                return 1;
            }
            else //EXCEPTION
            {
                return -1;
            }
        }

    }
}
    

    


